import mongoose from "mongoose";
import env from "./env";
import { infoLog } from "./log";

mongoose.connect(env.MONGO_URL)
    .then(() => infoLog("数据库连接成功"))
    .catch(err => {
        infoLog(err, "数据库连接失败")
        process.exit(1)
    }
    )